package com.bluesky.jwf.example1.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Person implements Serializable {
	private String name;
	private Date birthDate;
	private String email;
	private Person manger;
	private List<Person> subordinates=new ArrayList<Person>();

	public Person(String name, Date birthDate, String email) {
		this.name = name;
		this.birthDate = birthDate;
		this.email = email;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	 
	
	public Person getManger() {
		return manger;
	}

	public void setManger(Person manger) {
		this.manger = manger;
	}

	public List<Person> getSubordinates() {
		return subordinates;
	}

	public void setSubordinates(List<Person> subordinates) {
		this.subordinates = subordinates;
	}

	public void addSubordinate(Person subordinate){
		subordinates.add(subordinate);
		subordinate.setManger(this);
	}

}
